<?php
session_start();
require('conexion.php');
if(isset($_POST['idprod']))
$idprod=$_POST['idprod'];
$sql = "select existencia from productoxsucursal where id_producto=$idprod and id_sucursal='".$_SESSION['idsuc']."'";
$rs = $conn->Execute($sql);
echo $rs->fields[0];
?>